<script setup></script>

<template>
  <a-config-provider :update-at-scroll="true" :locale="locale">
    <router-view />
  </a-config-provider>
</template>

<script>
import { ref, computed } from 'vue'
import zhTW from '@arco-design/web-vue/es/locale/lang/zh-tw'

const locales = {
  'zh-tw': zhTW,
}

export default {
  setup() {
    const localeType = ref('zh-tw')
    const locale = computed(() => {
      return locales[localeType.value] || zhTW
    })

    return {
      localeType,
      locale,
      localeOptions: Object.keys(locales),
    }
  },
}
</script>
